package com.ecnu.system.service.impl;

import com.ecnu.common.core.page.PageDomain;
import com.ecnu.common.core.page.TableDataInfo;
import com.ecnu.common.utils.OtherUtil;
import com.ecnu.common.utils.PageUtils;
import com.ecnu.system.domain.ProjectTeacher;
import com.ecnu.system.domain.vo.ProjectUserVO;
import com.ecnu.system.mapper.ProjectTeacherMapper;
import com.ecnu.system.service.IProjectTeacherService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * ecnu_活动_主讲人	 服务实现类
 * </p>
 *
 * @author zdn
 * @since 2025-03-20
 */
@Service
public class ProjectTeacherServiceImpl extends ServiceImpl<ProjectTeacherMapper, ProjectTeacher> implements IProjectTeacherService {
    @Autowired
    private ProjectTeacherMapper teacherMapper;
    protected void startPage(PageDomain pageDomain) {
        PageUtils.startPage(pageDomain);
    }

    @Override
    public TableDataInfo getProUser(String id, String nickName, PageDomain domain) {
        startPage(domain);
        List<ProjectUserVO> proUser = teacherMapper.getProUser(id, nickName);
        return OtherUtil.tableSuccess(proUser);
    }
}
